#include <iostream>
#include <string>
using namespace std;

class Solution 
{
public:
    bool static isPalindrome(string s)
    {
        string newstr;

        for (int i = 0; i < s.size(); i++)
        {
            if (s[i] >= 'A' && s[i] <= 'z')
            {
                newstr += tolower(s[i]);
            }

            if (s[i] >= '0' && s[i] <= '9')
            {
                newstr += s[i];
            }
        }

        cout << newstr;

        s = newstr;
        reverse(newstr.begin(), newstr.end());

        return s == newstr;
    }
};

int main()
{
    
    string s("ab_a");
    bool ret = Solution::isPalindrome(s);

    cout << ret << endl;

    return 0;
}